Tootsville::Infinity-Wtl

Function

Infinity-Wtl names a function, with lambda list (D U R):

Walk the Line

Lisp WTL = JSON wtl

Users send a “wtl” packet when they're moving in a straight line; while other (arc) shapes were considered, they're not currently supported. Each “wtl” packet has a start and end point, a start time, and a speed; this course is enough information for other clients to determine where along the line (linear interpolation) the walker is now.

Usage

{ course: 
  { startPosition: {  x:  y:  z:  },
    startTime: UNIX-TIME,
    endPosition: { x: y: z: }, 
    speed: SPEED }, 
  facing: RADIANS }

Facing can be given as TOOTSVILLE INTERPRET-FACING, and will be converted to decimal radians.

In return, all observers receive these “wtl” packets back ... WRITEME

Reply

{ from: "wtl", status: true, course: {}, facing:, u: UUID, n: NAME }

Future Directions

There is limited, partial, and broken support for the new d3 system which will eventually supersede wtl in Romance 2, but it is not useful today. Use wtl in new code.

See Also

See TOOTSVILLE INFINITY-SET-USER-VAR for discussion of an alternative way to submit a wtl packet or the legacy d form (see below).

Changes from 1.1

In Romance 1.0 and 1.1, the usual way to walk was using the d user variable, which was a string encoding very similar to the intent of wtl. The d string was developed by Robert Dawson and Bruce-Robert Pocock to cover up network latency by providing a concrete (linear interpolated) position for each character at all times, no matter how laggy players' network connections were.

In the Persephone client software, these were sometimes referred to as a datList.

d strings consisted of a ~ delimited list of either x1~z1~x2~z2~facing~startTime or x1~y1~x2~y2~facing~startTime~z1~z2. Note how the two-coördinate form uses x,z with y pinned at zero.

As with wtl, facing can be supplied in either radians or as a value from the list N NE E SE S SW W NW. See TOOTSVILLE INTERPRET-FACING.

File

Defined in file src/infinity/new-commands-20.lisp.